Adds an entry using key and value pair and absolute expiration date into the cache, and returns an existing cache entry with a matching key.
public virtual T AddOrGetExisting<T>(
string key,
T value,
DateTime absoluteExpiration,
string regionName
)
key
Unique identifier of the cache item.
value
Data for the cache item.
absoluteExpiration
Absolute expiration date to use.
regionName
Optional name of a region in cache.
The previous cache entry that matches the specified key, if found. If the cache contains an item with the same key, then it will be returned before it is overwritten. Otherwise, null.